<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   
    <%@ include file="/easyprepay/jsp/common/head.jsp"%>
    <%@ taglib uri="/easyprepay" prefix="easy"%>
    <title>添加用戶角色</title>
    <script type="text/javascript">
    	function getReturn(){
    		location.href="<%=basePath%>userRole.do?method=allUserRole&";
    	}
    	function addRole(){
    		var newRoleName = document.getElementById("newRoleName").value;
    		
    		if(!newRoleName==' '){
    			
    			location.href="<%=basePath%>userRole.do?method=addRole&newRoleName="+newRoleName;
    		}else{
    			alert("请正确的输入角色的名称");
    		}
    	}
    </script>
	

  </head>
  
  <body>
    
  <input type="hidden" id="currentUser" name="currentUser"
				value="<%=user.getUsername()%>" />
			<input type="hidden" id="userKey" name="userKey"
				value="<%=user.getKeyWord()%>" />
    	<table >
    		<tr><td>添加新的角色</td></tr>
    		<tr><td>角色名称</td></tr>
    		<tr><td><input type="text" id="newRoleName" name="newRoleName" ></td></trd>
    		<tr><td><input type="button" onclick="addRole()" value="添加"><input type="reset" value="取消"><input type="button" value="返回" onclick="getReturn()"></td></tr>
    	</table>
    
  </body>
</html>
